package com.yuncheng.mcp.config;

import com.yuncheng.mcp.service.DateTimeService;
import com.yuncheng.mcp.service.MediaService;
import com.yuncheng.mcp.service.WeatherService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @title: McpWebFluxServiceExampleConfig
 * @Author: Liuxk
 * @Date: 2025/5/22 11:25
 */

@Configuration
public class McpSseServerConfig {

    @Bean
    public ToolCallbackProvider weatherTools(WeatherService weatherService) {
        return MethodToolCallbackProvider.builder().toolObjects(weatherService).build();
    }

    @Bean
    public ToolCallbackProvider dateTimeTools(DateTimeService dateTimeService) {
        return MethodToolCallbackProvider.builder().toolObjects(dateTimeService).build();
    }

    @Bean
    public ToolCallbackProvider mediaTools(MediaService mediaService) {
        return MethodToolCallbackProvider.builder().toolObjects(mediaService).build();
    }

}
